package homework3;

public class SalesEmployee extends ColaEmployee {
    private int saleValue;
    private double interest;

    //计算工资

    @Override
    public int getSalary(int month) {
        saleValue+=saleValue*interest;
        if(super.getBirthMonth()==month)
        {

            return saleValue+100;
        }
        return saleValue;
    }

    //
    public SalesEmployee()
    {

    }
    public SalesEmployee(String emName, int birthMonth, int saleValue, double interest) {
        super(emName, birthMonth);
        this.saleValue = saleValue;
        this.interest = interest;
    }

    public int getSaleValue() {
        return saleValue;
    }

    public void setSaleValue(int saleValue) {
        this.saleValue = saleValue;
    }

    public double getInterest() {
        return interest;
    }

    public void setInterest(double interest) {
        this.interest = interest;
    }
}
